<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
*/
class Pages extends CI_Controller {

    public function view($page = 'home') {
        #show_error('消息',$status_code = 500);
        if ( ! file_exists('application/views/pages/'.$page.'.php')) {
            // 页面不存在
            show_404();
        }

        $data['title'] = ucfirst($page); // 将title中的第一个字符大写

        $this->load->view('tpl/header', $data);
        $this->load->view('pages/'.$page, $data);
        $this->load->view('tpl/footer', $data);
    }
}
?>
